<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Titi
  Date: 2020/10/3
  Time: 18:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="<%=request.getContextPath()%>/css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/css/index01.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/css/loading.css" rel="stylesheet" type="text/css">
    <link href="<%=request.getContextPath()%>/css/index.css" rel="stylesheet">
</head>
<body style="background: #eee; ">
<jsp:include page="../common/nav.jsp"></jsp:include>

<div style="background:#eee">
    <div class="wrapper wrapper-content" style="margin-left: 9%;margin-right: 9%">
        <div class="row" style="display: flex">
            <div class="col-md-12">
                <div class="ibox">
                    <div class="col-md-13">
                        <div class="widget lazur-bg no-padding">
                            <div class="p-m"><h2 class="m-xs" style="font-weight: bold">热门题目</h2></div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="project-list">
                            <table class="table table-hover">
                                <tbody>
                                <c:forEach  items="${completions}" var="c" begin="0" end="35">
                                    <tr>
                                        <td class="project-status">
                                            <span class="label label-primary" id="language">${c.comLanguage}</span>
                                        </td>
                                        <td class="project-title">
                                            <a id="stem">${c.comStem}</a>
                                        </td>

                                        <td class="project-completion">
                                            <small id="diff">${c.comDiff}</small>
                                        </td>
                                        <td class="project-people"></td>
                                        <td class="project-actions">
                                       <c:if test="${!c.iscollect}">
                                           <button type="button"class="btn btn-white btn-sm" onclick="Collectsss(this,'${c.comLanguage}','${c.comStem}','${c.comDiff}',${sessionScope.user.usId})" id="lettt" style="border: none;background-color: white ;font-size: 13px">收藏本题</button>
                                       </c:if>
                                        <c:if test="${c.iscollect}">
                                            <button type="button"class="btn btn-white btn-sm" id="lettt" style="border: none;background-color: white ;font-size: 13px">已收藏</button>
                                        </c:if>
                                            <button type="button"class="btn btn-white btn-sm" id="try" onclick="Makequ('${c.comStem}')"  style="border: none;background-color: white ;font-size: 13px"> 尝试一下</button>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div>
                    <div class="widget p-lg text-center"style="background:#FF6666">
                        <div class="row">
                            <div class="p-m">
                                <h1 class="m-xs" style="font-weight: bold;color: white">排行榜</h1>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div>
                            <div class="ques-section-card" >
                                <div class="ques-card-head ques-card-bul ">
                                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="365px" height="30px" xml:space="preserve">
                                                <defs>
                                                    <pattern id="water" width=".25" height="1.1" patternContentUnits="objectBoundingBox">
                                                        <path fill="#fff" d="M0.25,1H0c0,0,0-0.659,0-0.916c0.083-0.303,0.158,0.334,0.25,0C0.25,0.327,0.25,1,0.25,1z"></path>
                                                    </pattern>
                                                    <g id="eff">
                                                        <rect fill="url(#water)" x="-119.461" y="0" width="1200" height="120" opacity="0.3">
                                                            <animate attributeType="xml" attributeName="x" from="-300" to="0" repeatCount="indefinite" dur="10s"></animate>
                                                        </rect>
                                                        <rect fill="url(#water)" y="5" width="1600" height="125" opacity="0.3" x="-399.447">
                                                            <animate attributeType="xml" attributeName="x" from="-400" to="0" repeatCount="indefinite" dur="13s"></animate>
                                                        </rect>
                                                    </g>
                                                </defs>
                                        <use xlink:href="#eff" opacity="1" style="mix-blend-mode:normal;"></use>
				                    </svg>
                                </div>
                                <div class="ques-card-title ques-card-title-top">JAVA排行榜</div>
                                <ul class="ques-card-list">
                                    <c:forEach items="${javarank}" begin="0" end="5" var="i">
                                        <li class="ques-card-list-noe">
                                            <div class="ques-list-box clearfix">
                                                <img src="${i.usAvatar}" class="layui-nav-img" style="float: left">
                                                <div class="ques-list-name" style="float: left">
                                                    <div class="ques-list-name-head">  ${i.usNickname}</div>
                                                    <div class="ques-list-name-text"> 等级:${i.levelUlevel}</div>
                                                </div>
                                            </div>
                                        </li>
                                    </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div style="margin-top: 5px">
                        <div>
                            <div class="ques-section-card" >
                                <div class="ques-card-head ques-card-bul">
                                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="365px" height="30px" xml:space="preserve">
                                                <defs>
                                                    <pattern id="water" width=".25" height="1.1" patternContentUnits="objectBoundingBox">
                                                        <path fill="#fff" d="M0.25,1H0c0,0,0-0.659,0-0.916c0.083-0.303,0.158,0.334,0.25,0C0.25,0.327,0.25,1,0.25,1z"></path>
                                                    </pattern>
                                                    <g id="eff">
                                                        <rect fill="url(#water)" x="-119.461" y="0" width="1200" height="120" opacity="0.3">
                                                            <animate attributeType="xml" attributeName="x" from="-300" to="0" repeatCount="indefinite" dur="10s"></animate>
                                                        </rect>
                                                        <rect fill="url(#water)" y="5" width="1600" height="125" opacity="0.3" x="-399.447">
                                                            <animate attributeType="xml" attributeName="x" from="-400" to="0" repeatCount="indefinite" dur="13s"></animate>
                                                        </rect>
                                                    </g>
                                                </defs>
                                        <use xlink:href="#eff" opacity="1" style="mix-blend-mode:normal;"></use>
				                    </svg>
                                </div>
                                <div class="ques-card-title ques-card-title-top">PYTHON排行榜</div>
                                <ul class="ques-card-list">
                                    <c:forEach items="${pythonrank}" begin="0" end="5" var="i">
                                        <li class="ques-card-list-noe">
                                            <div class="ques-list-box clearfix">
                                                <img src="${i.usAvatar}" class="layui-nav-img" style="float: left">
                                                <div class="ques-list-name" style="float: left">
                                                    <div class="ques-list-name-head">  ${i.usNickname}</div>
                                                    <div class="ques-list-name-text"> 等级:${i.levelUlevel}</div>
                                                </div>
                                            </div>
                                        </li>
                                    </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div style="margin-top: 5px">
                        <div>
                            <div class="ques-section-card" >
                                <div class="ques-card-head ques-card-bul">
                                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="365px" height="30px" xml:space="preserve">
                                                <defs>
                                                    <pattern id="water" width=".25" height="1.1" patternContentUnits="objectBoundingBox">
                                                        <path fill="#fff" d="M0.25,1H0c0,0,0-0.659,0-0.916c0.083-0.303,0.158,0.334,0.25,0C0.25,0.327,0.25,1,0.25,1z"></path>
                                                    </pattern>
                                                    <g id="eff">
                                                        <rect fill="url(#water)" x="-119.461" y="0" width="1200" height="120" opacity="0.3">
                                                            <animate attributeType="xml" attributeName="x" from="-300" to="0" repeatCount="indefinite" dur="10s"></animate>
                                                        </rect>
                                                        <rect fill="url(#water)" y="5" width="1600" height="125" opacity="0.3" x="-399.447">
                                                            <animate attributeType="xml" attributeName="x" from="-400" to="0" repeatCount="indefinite" dur="13s"></animate>
                                                        </rect>
                                                    </g>
                                                </defs>
                                        <use xlink:href="#eff" opacity="1" style="mix-blend-mode:normal;"></use>
				                    </svg>
                                </div>
                                <div class="ques-card-title ques-card-title-top">WEB排行榜</div>
                                <ul class="ques-card-list">
                                    <c:forEach items="${webrank}" begin="0" end="5" var="i">
                                        <li class="ques-card-list-noe">
                                            <div class="ques-list-box clearfix">
                                                <img src="${i.usAvatar}" class="layui-nav-img" style="float: left">
                                                <div class="ques-list-name" style="float: left">
                                                    <div class="ques-list-name-head">  ${i.usNickname}</div>
                                                    <div class="ques-list-name-text"> 等级:${i.levelUlevel}</div>
                                                </div>
                                            </div>
                                        </li>
                                    </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div style="margin-top: 5px">
                        <div>
                            <div class="ques-section-card" >
                                <div class="ques-card-head ques-card-bul">
                                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="365px" height="30px" xml:space="preserve">
                                                <defs>
                                                    <pattern id="water" width=".25" height="1.1" patternContentUnits="objectBoundingBox">
                                                        <path fill="#fff" d="M0.25,1H0c0,0,0-0.659,0-0.916c0.083-0.303,0.158,0.334,0.25,0C0.25,0.327,0.25,1,0.25,1z"></path>
                                                    </pattern>
                                                    <g id="eff">
                                                        <rect fill="url(#water)" x="-119.461" y="0" width="1200" height="120" opacity="0.3">
                                                            <animate attributeType="xml" attributeName="x" from="-300" to="0" repeatCount="indefinite" dur="10s"></animate>
                                                        </rect>
                                                        <rect fill="url(#water)" y="5" width="1600" height="125" opacity="0.3" x="-399.447">
                                                            <animate attributeType="xml" attributeName="x" from="-400" to="0" repeatCount="indefinite" dur="13s"></animate>
                                                        </rect>
                                                    </g>
                                                </defs>
                                        <use xlink:href="#eff" opacity="1" style="mix-blend-mode:normal;"></use>
				                    </svg>
                                </div>
                                <div class="ques-card-title ques-card-title-top">C/C++排行榜</div>
                                <ul class="ques-card-list">
                                    <c:forEach items="${crank}" begin="0" end="5" var="i">
                                        <li class="ques-card-list-noe">
                                            <div class="ques-list-box clearfix">
                                                <img src="${i.usAvatar}" class="layui-nav-img" style="float: left">
                                                <div class="ques-list-name" style="float: left">
                                                    <div class="ques-list-name-head">  ${i.usNickname}</div>
                                                    <div class="ques-list-name-text"> 等级:${i.levelUlevel}</div>
                                                </div>
                                            </div>
                                        </li>
                                    </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div style="margin-top: 5px">
                        <div>
                            <div class="ques-section-card" >
                                <div class="ques-card-head ques-card-bul">
                                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="365px" height="30px" xml:space="preserve">
                                                <defs>
                                                    <pattern id="water" width=".25" height="1.1" patternContentUnits="objectBoundingBox">
                                                        <path fill="#fff" d="M0.25,1H0c0,0,0-0.659,0-0.916c0.083-0.303,0.158,0.334,0.25,0C0.25,0.327,0.25,1,0.25,1z"></path>
                                                    </pattern>
                                                    <g id="eff">
                                                        <rect fill="url(#water)" x="-119.461" y="0" width="1200" height="120" opacity="0.3">
                                                            <animate attributeType="xml" attributeName="x" from="-300" to="0" repeatCount="indefinite" dur="10s"></animate>
                                                        </rect>
                                                        <rect fill="url(#water)" y="5" width="1600" height="125" opacity="0.3" x="-399.447">
                                                            <animate attributeType="xml" attributeName="x" from="-400" to="0" repeatCount="indefinite" dur="13s"></animate>
                                                        </rect>
                                                    </g>
                                                </defs>
                                        <use xlink:href="#eff" opacity="1" style="mix-blend-mode:normal;"></use>
				                    </svg>
                                </div>
                                <div class="ques-card-title ques-card-title-top">MYSQL排行榜</div>
                                <ul class="ques-card-list">
                                    <c:forEach items="${sqlrank}" begin="0" end="5" var="i">
                                        <li class="ques-card-list-noe">
                                            <div class="ques-list-box clearfix">
                                                <img src="${i.usAvatar}" class="layui-nav-img" style="float: left">
                                                <div class="ques-list-name" style="float: left">
                                                    <div class="ques-list-name-head">  ${i.usNickname}</div>
                                                    <div class="ques-list-name-text"> 等级:${i.levelUlevel}</div>
                                                </div>
                                            </div>
                                        </li>
                                    </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<jsp:include page="../common/foot.jsp"></jsp:include>


<!-- 全局js -->
<script src="<%=request.getContextPath()%>/js/jquery.min.js?v=2.1.4"></script>
<script src="<%=request.getContextPath()%>/js/bootstrap.min.js?v=3.3.6"></script>
<script src="<%=request.getContextPath()%>/js/compage.js"></script>





<!-- 自定义js -->
<!--    <script src="js/content.js?v=1.0.0"></script>-->


</body>
</html>
